import random
secret = random.randint(1,10)
print("----------------这是一个猜数字小游戏-----------------")
temp = input("猜猜我心里想的数字是多少？\n")
guess = int(temp)
if guess == secret:
    print("猜对了，恭喜你！\n")
while guess != secret:

    if guess > secret:
        strr = "大了！"
    else:
        strr = "小了！"
    print("猜错了！tips: 您输入的数字",strr)
    temp = input("请重新输入\n")
    guess = int(temp)
    if guess == secret:
        print("猜对了，恭喜你！\n")
print("游戏结束！")
